package com.sjl.dao;

import com.sjl.pojo.Member;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface MemberMapper {
    /**
     * 根据用户名查询会员
     * @param
     * @return
     */
    Member getMemberByUsername(String NAME);

    /**
     * 获取所有会员
     * @param
     * @return
     */
    List<Member> getAllMembers(@Param("NAME") String NAME);

    /**
     * 根据Id查询会员
     */
    Member getMemberById(@Param("id") Integer id);

    /**
     * 新增会员
     */
    int addMember(Member member);

    /**
     * 修改会员
     */
    int editMember(Member member);

    /**
     * 根据id删除会员
     */
    int deleteMemberById(@Param("id") Integer id);

    /**
     * 批量删除
     */
    int deleteAll(@Param("ids") List<String> ids);
}